/*
 * JinkFrame.java
 * 
 * Created on December 7, 2008, 12:37 AM
 */

package gui.beans;

import javax.swing.DefaultListModel;

/**
 * 
 * @author Jason
 */
public abstract class JinkGUI_Beans extends javax.swing.JFrame {

	/** Creates new form JinkFrame */
	public JinkGUI_Beans() {
		initComponents();
	}

	protected abstract void newChart();

	protected abstract void loadChart();

	protected abstract void saveChart();

	protected abstract void setShowGrid(boolean b);

	protected abstract void setAlignGrid(boolean b);

	protected abstract void setShowGlimpse(boolean b);

	protected abstract void showAbout();

	protected abstract void showInstructions();

	protected abstract DefaultListModel getStackModel();

	protected abstract void exit();

	/**
	 * This method is called from within the constructor to initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is always
	 * regenerated by the Form Editor.
	 */
	// <editor-fold defaultstate="collapsed" desc="Generated Code">
	private void initComponents() {

		jPanel1 = new javax.swing.JPanel();
		mainAreaContainer = new javax.swing.JPanel();
		jPanel2 = new javax.swing.JPanel();
		jPanel3 = new javax.swing.JPanel();
		jScrollPane1 = new javax.swing.JScrollPane();
		stackList = new javax.swing.JList();
		nodeInfoHolder = new javax.swing.JPanel();
		jLabel1 = new javax.swing.JLabel();
		jScrollPane2 = new javax.swing.JScrollPane();
		sideBarContainer = new javax.swing.JPanel();
		jMenuBar1 = new javax.swing.JMenuBar();
		jMenu1 = new javax.swing.JMenu();
		newMenuitem = new javax.swing.JMenuItem();
		openMenuItem = new javax.swing.JMenuItem();
		saveMenuItem = new javax.swing.JMenuItem();
		exitMenuitem = new javax.swing.JMenuItem();
		jMenu3 = new javax.swing.JMenu();
		showGridMenuItem = new javax.swing.JCheckBoxMenuItem();
		alignGridMenuItem = new javax.swing.JCheckBoxMenuItem();
		showGlimpseMenuItem = new javax.swing.JCheckBoxMenuItem();
		jMenu2 = new javax.swing.JMenu();
		jMenuItem1 = new javax.swing.JMenuItem();
		aboutMenuItem = new javax.swing.JMenuItem();

		setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
		setTitle("Jink UML Planner");

		mainAreaContainer.setLayout(new java.awt.GridLayout(1, 1));

		stackList.setModel(getStackModel());
		jScrollPane1.setViewportView(stackList);

		nodeInfoHolder.setLayout(new java.awt.GridLayout(1, 1));

		jLabel1.setText("View Stack ");

		javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(
				jPanel3);
		jPanel3.setLayout(jPanel3Layout);
		jPanel3Layout.setHorizontalGroup(jPanel3Layout.createParallelGroup(
				javax.swing.GroupLayout.Alignment.LEADING).addComponent(
				jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 207,
				Short.MAX_VALUE).addGroup(
				jPanel3Layout.createSequentialGroup().addContainerGap()
						.addComponent(jLabel1).addContainerGap(143,
								Short.MAX_VALUE)).addComponent(nodeInfoHolder,
				javax.swing.GroupLayout.Alignment.TRAILING,
				javax.swing.GroupLayout.DEFAULT_SIZE, 207, Short.MAX_VALUE));
		jPanel3Layout
				.setVerticalGroup(jPanel3Layout
						.createParallelGroup(
								javax.swing.GroupLayout.Alignment.LEADING)
						.addGroup(
								javax.swing.GroupLayout.Alignment.TRAILING,
								jPanel3Layout
										.createSequentialGroup()
										.addComponent(
												nodeInfoHolder,
												javax.swing.GroupLayout.DEFAULT_SIZE,
												253, Short.MAX_VALUE)
										.addPreferredGap(
												javax.swing.LayoutStyle.ComponentPlacement.RELATED)
										.addComponent(jLabel1)
										.addPreferredGap(
												javax.swing.LayoutStyle.ComponentPlacement.RELATED)
										.addComponent(
												jScrollPane1,
												javax.swing.GroupLayout.PREFERRED_SIZE,
												78,
												javax.swing.GroupLayout.PREFERRED_SIZE)));

		sideBarContainer.setLayout(new java.awt.GridLayout(1, 1));
		jScrollPane2.setViewportView(sideBarContainer);

		javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(
				jPanel2);
		jPanel2.setLayout(jPanel2Layout);
		jPanel2Layout.setHorizontalGroup(jPanel2Layout.createParallelGroup(
				javax.swing.GroupLayout.Alignment.LEADING).addComponent(
				jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 207,
				Short.MAX_VALUE).addComponent(jPanel3,
				javax.swing.GroupLayout.DEFAULT_SIZE,
				javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
		jPanel2Layout
				.setVerticalGroup(jPanel2Layout
						.createParallelGroup(
								javax.swing.GroupLayout.Alignment.LEADING)
						.addGroup(
								jPanel2Layout
										.createSequentialGroup()
										.addComponent(
												jScrollPane2,
												javax.swing.GroupLayout.PREFERRED_SIZE,
												134,
												javax.swing.GroupLayout.PREFERRED_SIZE)
										.addPreferredGap(
												javax.swing.LayoutStyle.ComponentPlacement.RELATED)
										.addComponent(
												jPanel3,
												javax.swing.GroupLayout.DEFAULT_SIZE,
												javax.swing.GroupLayout.DEFAULT_SIZE,
												Short.MAX_VALUE)));

		javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(
				jPanel1);
		jPanel1.setLayout(jPanel1Layout);
		jPanel1Layout.setHorizontalGroup(jPanel1Layout.createParallelGroup(
				javax.swing.GroupLayout.Alignment.LEADING).addGroup(
				jPanel1Layout.createSequentialGroup().addComponent(
						mainAreaContainer,
						javax.swing.GroupLayout.DEFAULT_SIZE, 594,
						Short.MAX_VALUE).addPreferredGap(
						javax.swing.LayoutStyle.ComponentPlacement.RELATED)
						.addComponent(jPanel2,
								javax.swing.GroupLayout.PREFERRED_SIZE,
								javax.swing.GroupLayout.DEFAULT_SIZE,
								javax.swing.GroupLayout.PREFERRED_SIZE)));
		jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(
				javax.swing.GroupLayout.Alignment.LEADING).addComponent(
				mainAreaContainer, javax.swing.GroupLayout.DEFAULT_SIZE, 497,
				Short.MAX_VALUE).addComponent(jPanel2,
				javax.swing.GroupLayout.Alignment.TRAILING,
				javax.swing.GroupLayout.DEFAULT_SIZE,
				javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));

		jMenu1.setText("File");

		newMenuitem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
				java.awt.event.KeyEvent.VK_N,
				java.awt.event.InputEvent.CTRL_MASK));
		newMenuitem.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				"/gui/beans/new file.png"))); // NOI18N
		newMenuitem.setText("New");
		newMenuitem.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				newMenuitemActionPerformed(evt);
			}
		});
		jMenu1.add(newMenuitem);

		openMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
				java.awt.event.KeyEvent.VK_O,
				java.awt.event.InputEvent.CTRL_MASK));
		openMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				"/gui/beans/open folder.png"))); // NOI18N
		openMenuItem.setText("Open");
		openMenuItem.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				openMenuItemActionPerformed(evt);
			}
		});
		jMenu1.add(openMenuItem);

		saveMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
				java.awt.event.KeyEvent.VK_S,
				java.awt.event.InputEvent.CTRL_MASK));
		saveMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource(
				"/gui/beans/Floppy Drive 3.png"))); // NOI18N
		saveMenuItem.setText("Save");
		saveMenuItem.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				saveMenuItemActionPerformed(evt);
			}
		});
		jMenu1.add(saveMenuItem);

		exitMenuitem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(
				java.awt.event.KeyEvent.VK_Q,
				java.awt.event.InputEvent.CTRL_MASK));
		exitMenuitem.setText("Exit");
		exitMenuitem.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				exitMenuitemActionPerformed(evt);
			}
		});
		jMenu1.add(exitMenuitem);

		jMenuBar1.add(jMenu1);

		jMenu3.setText("View");

		showGridMenuItem.setSelected(true);
		showGridMenuItem.setText("Show Grid");
		showGridMenuItem.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				showGridMenuItemActionPerformed(evt);
			}
		});
		jMenu3.add(showGridMenuItem);

		alignGridMenuItem.setSelected(true);
		alignGridMenuItem.setText("Align To Grid");
		alignGridMenuItem
				.addActionListener(new java.awt.event.ActionListener() {
					public void actionPerformed(java.awt.event.ActionEvent evt) {
						alignGridMenuItemActionPerformed(evt);
					}
				});
		jMenu3.add(alignGridMenuItem);

		showGlimpseMenuItem.setSelected(true);
		showGlimpseMenuItem.setText("Show Glimpses");
		showGlimpseMenuItem
				.addActionListener(new java.awt.event.ActionListener() {
					public void actionPerformed(java.awt.event.ActionEvent evt) {
						showGlimpseMenuItemActionPerformed(evt);
					}
				});
		jMenu3.add(showGlimpseMenuItem);

		jMenuBar1.add(jMenu3);

		jMenu2.setText("Help");

		jMenuItem1.setText("Instructions");
		jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				jMenuItem1ActionPerformed(evt);
			}
		});
		jMenu2.add(jMenuItem1);

		aboutMenuItem.setText("About");
		aboutMenuItem.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				aboutMenuItemActionPerformed(evt);
			}
		});
		jMenu2.add(aboutMenuItem);

		jMenuBar1.add(jMenu2);

		setJMenuBar(jMenuBar1);

		javax.swing.GroupLayout layout = new javax.swing.GroupLayout(
				getContentPane());
		getContentPane().setLayout(layout);
		layout.setHorizontalGroup(layout.createParallelGroup(
				javax.swing.GroupLayout.Alignment.LEADING).addComponent(
				jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
				javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
		layout.setVerticalGroup(layout.createParallelGroup(
				javax.swing.GroupLayout.Alignment.LEADING).addComponent(
				jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE,
				javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));

		pack();
	}// </editor-fold>

	private void newMenuitemActionPerformed(java.awt.event.ActionEvent evt) {
		newChart();
	}

	private void openMenuItemActionPerformed(java.awt.event.ActionEvent evt) {
		loadChart();
	}

	private void saveMenuItemActionPerformed(java.awt.event.ActionEvent evt) {
		saveChart();
	}

	private void exitMenuitemActionPerformed(java.awt.event.ActionEvent evt) {
		exit();
	}

	private void showGridMenuItemActionPerformed(java.awt.event.ActionEvent evt) {
		setShowGrid(showGridMenuItem.isSelected());
	}

	private void alignGridMenuItemActionPerformed(java.awt.event.ActionEvent evt) {
		setAlignGrid(alignGridMenuItem.isSelected());
	}

	private void aboutMenuItemActionPerformed(java.awt.event.ActionEvent evt) {
		showAbout();
	}

	private void showGlimpseMenuItemActionPerformed(
			java.awt.event.ActionEvent evt) {
		setShowGlimpse(showGlimpseMenuItem.isSelected());
	}

	private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {
		showInstructions();
	}

	// Variables declaration - do not modify
	protected javax.swing.JMenuItem aboutMenuItem;
	protected javax.swing.JCheckBoxMenuItem alignGridMenuItem;
	protected javax.swing.JMenuItem exitMenuitem;
	protected javax.swing.JLabel jLabel1;
	protected javax.swing.JMenu jMenu1;
	protected javax.swing.JMenu jMenu2;
	protected javax.swing.JMenu jMenu3;
	protected javax.swing.JMenuBar jMenuBar1;
	protected javax.swing.JMenuItem jMenuItem1;
	protected javax.swing.JPanel jPanel1;
	protected javax.swing.JPanel jPanel2;
	protected javax.swing.JPanel jPanel3;
	protected javax.swing.JScrollPane jScrollPane1;
	protected javax.swing.JScrollPane jScrollPane2;
	protected javax.swing.JPanel mainAreaContainer;
	protected javax.swing.JMenuItem newMenuitem;
	protected javax.swing.JPanel nodeInfoHolder;
	protected javax.swing.JMenuItem openMenuItem;
	protected javax.swing.JMenuItem saveMenuItem;
	protected javax.swing.JCheckBoxMenuItem showGlimpseMenuItem;
	protected javax.swing.JCheckBoxMenuItem showGridMenuItem;
	protected javax.swing.JPanel sideBarContainer;
	protected javax.swing.JList stackList;
	// End of variables declaration

}
